Skip to main content

Any Missing Data

any_missing(input: any[] | Mat | Tensor) : boolean

param input - The input to check for any missing data

returns: boolean - True if there is at least 1 missing element, false otherwise

This function simply goes through the data, whether it be a list, array or whatnot and checks for missing values. Missing values are namely, NaN, null, '', undefined. Notice that [] and {} are not considered missing. Hence it will comb through the data searching for these 4 types of missing values and if it returns true at least once, it will return that there is missing values.

This is useful for searching in large arrays and should be standard. If not done, you may get an error and that error may not be understood to be coming from the missing elements. Below is some smaller scale examples of how to use this function.

The most important or frequent usage of this concept is when importing large data files and translating them such as csv files, you may end up with a lot of null or NaN entries.